/* GUI CONVERTED from rcladchk.p (converter v1.75) Tue Apr 10 12:04:39 2001 */
/* rcladchk.p - ROUTINE TO CHECK EXISTENCE OF LAD_DET RECORD                  */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                        */
/* All rights reserved worldwide.  This is an unpublished work.               */
/* $Revision: 1.7 $                                                        */
/*V8:ConvertMode=Maintenance                                                  */
/* REVISION: 9.0         CREATED: 12/17/98    BY: *J374* Surekha Joshi        */
/* REVISION: 9.0   LAST MODIFIED: 03/13/99    BY: *M0BD* Alfred Tan           */
/* REVISION: 9.1   LAST MODIFIED: 08/12/00    BY: *N0KP* Mark Brown           */
/* $Revision: 1.7 $    BY: Jean Miller    DATE: 03/22/01 ECO: *P008*       */
/******************************************************************************/
/* All patch markers and commented out code have been removed from the source */
/* code below. For all future modifications to this file, any code which is   */
/* no longer required should be deleted and no in-line patch markers should   */
/* be added.  The ECO marker should only be included in the Revision History. */
/******************************************************************************/

/* THIS ROUTINE IS CALLED BY RCSHMTB.P TO CHECK EXISTENCE OF LAD_DET RECORD */
define input parameter l_sod_nbr   like sod_nbr no-undo.
define input parameter l_sod_line  like sod_line no-undo.
define input parameter l_sod_part  like sod_part no-undo.
define input parameter l_sr_site   like sr_site no-undo.
define input parameter l_sr_loc    like sr_loc no-undo.
define input parameter l_sr_lotser like sr_lotser no-undo.
define input parameter l_sr_ref    like sr_ref no-undo.

define input-output parameter l_lad_exist like mfc_logical no-undo.

/* IF LAD_DET RECORD EXISTS, SET L_LAD_EXIST TO YES */
for first lad_det
fields (lad_dataset lad_line lad_loc lad_lot lad_nbr lad_part
        lad_qty_pick lad_ref lad_site)
where lad_dataset = "sod_det"          and
      lad_nbr     = l_sod_nbr          and
      lad_line    = string(l_sod_line) and
      lad_part    = l_sod_part         and
      lad_site    = l_sr_site          and
      lad_loc     = l_sr_loc           and
      lad_lot     = l_sr_lotser        and
      lad_ref     = l_sr_ref
no-lock: end. /* FOR FIRST LAD_DET */

if available lad_det and lad_qty_pick <> 0 then
   l_lad_exist = yes.
